Extended cache for efficient object store access by a database

ABSTRACT

Disclosed herein are system, method, and computer program product embodiments for utilizing an extended cache to access an object store efficiently. An embodiment operates by executing a database transaction, thereby causing pages to be written from a buffer cache to an extended cache and to an object store. The embodiment determines a transaction type of the database transaction. The transaction type can a read-only transaction or an update transaction. The embodiment determines a phase of the database transaction based on the determined transaction type. The phase can be an execution phase or a commit phase. The embodiment then applies a caching policy to the extended cache for the evicted pages based on the determined transaction type of the database transaction and the determined phase of the database transaction.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.17/486,206, filed Sep. 27, 2021, which is hereby incorporated byreference in its entirety.

BACKGROUND

Many cloud-native database systems store data directly in an objectstore. This can reduce storage and compute costs. In addition, thesecloud-native database systems often benefit from the greater elasticityand scale-out properties offered by the cloud. However, performing readand write operations on an object store is often associated with higherlatencies. Moreover, because random access memory (RAM) is often moreexpensive on the cloud, it is often not possible to use a buffer managerthat relies purely on RAM to alleviate these higher latencies.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings are incorporated herein and form a part of thespecification.

FIG. 1 is a block diagram of a database system that uses an extendedcache to access an object store efficiently, according to someembodiments.

FIG. 2 is a block diagram illustrating the movement of pages between abuffer cache, an extended cache, and an object store, according to someembodiments.

FIG. 3 is a flowchart illustrating a process for using an extended cacheto access an object store efficiently, according to some embodiments.

FIG. 4 is an example computer system useful for implementing variousembodiments.

In the drawings, like reference numbers generally indicate identical orsimilar elements. Additionally, generally, the left-most digit(s) of areference number identifies the drawing in which the reference numberfirst appears.

DETAILED DESCRIPTION

Provided herein are system, apparatus, device, method and/or computerprogram product embodiments, and/or combinations and sub-combinationsthereof, for utilizing an extended cache to access an object storeefficiently.

FIG. 1 illustrates a database system 100 that uses an extended cache toaccess an object store efficiently, according to some embodiments.Database system 100 may be a traditional database management system(DBMS) implemented on a server computer. Database system 100 may also bea cloud database. Database system 100 may include a load engine 102,query engine 104, transaction manager 106, storage subsystem 108,extended cache manager 116, and extended cache 118. Storage subsystem108 may include a blockmap 110, buffer manager 112, and buffer cache114.

Load engine 102 may load data received from a source system intodatabase system 100. Load engine 102 may also validate the data receivedfrom the source system.

Query engine 104 may interpret a query received from a user via anapplication program into instructions for accessing data in databasesystem 100. For example, query engine 104 may process data manipulationlanguage (DML) statements (e.g. Structured Query Language (SQL)statements) into instructions for manipulating data in database system100.

Transaction manager 106 may control concurrent access to data indatabase system 100 by performing operations in a scheduled way. Thiscan ensure that the data in database system 100 remains in a consistentstate before and after execution of a transaction.

Buffer manager 112 may manage buffer cache 114. For example, buffermanager 112 may manage pages in buffer cache 114 according to blockmap110. Buffer cache 114 may be a high-speed cache of small size (e.g.,RAM).

Extended cache manager 116 may manage extended cache 118. Extended cache118 may be slower and bigger than buffer cache 114. For example,extended cache 118 may be a solid-state drive (SSD).

Object store 120 may be a data store that manages data as objects.Object store 120 may be slower and bigger than extended cache 118. Forexample, object store 120 may be a data store such as, but not limitedto, Amazon Web Services S3, Microsoft Azure Blob Storage, or GoogleCloud Storage. Database system 100 may store data directly in objectstore 120 via a communication network such as, but not limited to, theInternet.

Database system 100 may execute a database transaction in response toquery engine 104 receiving a query. When database system 100 performsthe database transaction, database system 100 may issue one or moreinput/output (I/O) operations to buffer cache 114, extended cache 118,and/or object store 120 to complete the database transaction. Databasesystem 100 may read and write data associated with the databasetransaction across buffer cache 114, extended cache 118, and/or objectstore 120 to improve I/O operation latency while minimizing increases inmoney, heat, and energy associated with increasing the size of buffercache 114.

Database system 100 may handle the I/O operations using pages. A pagemay be a fixed-length contiguous block of storage. Database system 100may store data associated with a database transaction as one or morepages in buffer cache 114, extended cache 118, and/or object store 120.Because buffer cache 114 may be smaller than extended cache 118,database system 100 may occasionally move pages from buffer cache 114 toextended cache 118, which may be slower and bigger than buffer cache114. Similarly, because extended cache 118 may be smaller than objectstore 120, database system 100 may occasionally move pages from extendedcache 118 to object store 120, which may be slower and bigger thanextended cache 118. When a database transaction is committed, databasesystem 100 can flush (or may be required to flush) the updated pages inbuffer cache 114 and/or extended cache 118 to object store 120 forpermanent storage.

Database system 100 may differentiate between the logical (e.g.,in-memory) and the physical (e.g., on-disk) representation of a page.For example, query engine 104 may be oblivious to how a page isphysically stored. Instead, query engine 104 may request a page frombuffer manager 112. The request may be in the form of<logical-page-number, version-counter>. In response, buffer manager 112may locate the correct version of the page from buffer cache 114according to the logical-page-number and version-counter. If the page isnot in buffer cache 114, database system 100 may look up the page inextended cache 118. If the page is not in extended cache 118, databasesystem 100 may retrieve the page from object store 120. Buffer manager112 may also cache the retrieved page in buffer cache 114 for later use.

FIG. 2 illustrates the movement of pages between buffer cache 114,extended cache 118, and object store 120, according to some embodiments.FIG. 2 is described with reference to FIG. 1 . However, FIG. 2 is notlimited to that example embodiment.

In response to a request for a page, buffer manager 112 may retrieve thecorrect version of the page (e.g., from buffer cache 114, extended cache118, or object store 120). Buffer manager 112 may cache the retrievedpage in buffer cache 114. Buffer manager 112 may store pages in a queueof buffer cache 114 organized from most recently used to least recentlyused (e.g., according to a least recently used (LRU) policy). Thus,buffer manager 121 may store the retrieved page at the most recentlyused end of the queue of buffer cache 114. In this approach, as a pageages in buffer cache 114, buffer manager 112 may eventually evict thepage from buffer cache 114. Once evicted, extended cache manager 116 canstore the page in extended cache 118.

Similarly, extended cache manger 116 may store pages in extended cache118 according to a LRU policy. For example, extended cache manger 116may store pages in directories in extended cache 118. Extended cachemanger 116 may also store pages in extended cache 118 using variousother approaches as would be appreciated by a person of ordinary skillin the art.

As a page ages in extended cache 118, extended cache manger 116 mayeventually evict the page from extended cache 118. Once evicted,depending on the page's dirty state, extended cache 118 can store thepage in object store 120 or discard it.

Before database system 100 commits a database transaction, databasesystem 100 may confirm that dirty pages associated with the databasetransaction are stored (or flushed) to object store 120 for permanentstorage. This is because the database transaction may have dirty pagesin buffer cache 114, extended cache 118, or both.

Every time a dirty page is flushed from buffer cache 114, databasesystem 100 may store the dirty page in object store 120 using a newobject key for the page. This can allow database system 100 to ensurethat every page that is stored in object store 120 has exactly oneversion, thereby enabling database system 100 to achieveread-after-write consistency.

Moreover, when database system 100 flushes a dirty page from buffercache 114, database system 100 may also store the dirty page in extendedcache 118, with the assumption that the page is still recent, andtherefore, that the page will likely be re-read.

In general, a database system often has to evict or flush pages to anobject store (e.g., object store 120). Similarly, the database systemoften has to read evicted or flushed pages from the object store.However, when the database system performs read and write operations onan object store, it often suffers from significantly higher latenciesthan when it performs read and write operations to a buffer cache or anextended cache. Moreover, it is often not possible for the databasesystem to utilize a buffer manager that relies purely on RAM toalleviate these higher latencies. This is often because RAM issignificantly more expensive than other forms of storage (e.g., a harddisk drive), particularly in cloud computing environments. To counteractthe impact of higher latencies without utilizing more RAM, the databasesystem may use an extended cache to access an object store. However,using an extended cache to access an object store may actually degradeperformance as opposed to improving it because extended caches oftenhave limited bandwidth compared to object stores. Embodiments hereinsolve these technological problems.

Embodiments herein solve these technological problems using extendedcache manager 116. First, extended cache manager 116 can solve thesetechnological problems by using a unique physical layout for extendedcache 118. Second, extended cache manager 116 can solve thesetechnological problems by using a unique hybrid caching policy thatmakes the best use of extended cache 118's bandwidth while stillexploiting the low I/O latencies that the extended cache 118 offers.Finally, extended cache manager 116 can solve these technologicalproblems by redirecting a varying percentage of I/O operations to objectstore 120, thereby gracefully handling workloads that saturate thebandwidth of extended cache 118.

Through these technological solutions, extended cache manager 116 canprovide the following benefits. First, extended cache manager 116 canincrease the capacity of buffer cache 114 managed by buffer manager 112without altering buffer manager 112's paging behavior. Second, extendedcache manager 116 can optimize buffer manager 112's caching for typicalOnline Analytical Processing (OLAP) workloads. Third, extended cachemanager 116's presence in database system 100 does not affecttransactional consistency. Finally, reading and writing to an objectstore (e.g., object store 120) typically incurs a cost. Extended cachemanager 116 can reduce some reads from the object store thereby reducingthis cost.

Extended cache manager 116 can solve the above technological problems byusing a unique physical layout for extended cache 118. In someembodiments, extended cache manager 116 can store all pages in extendedcache 118 in a flat file. In some other embodiments, extended cachemanager 116 can store each page in extended cache 118 as a separate filewithin a directory structure maintained by the operating system (OS).

In embodiments involving storing each page as a separate file within adirectory structure, extended cache manager 116 may use two approaches.First, extended cache manager 116 may store each page as a file under asingle directory. Second, extended cache manager 116 may store each pageas a file under a tree of sub-directories. This latter approach mayincrease database system 100's write performance to extended cache 118compared to storing each page as a file under a single directory.Moreover, this increase in write performance may depend on the choice offile system utilized by extended cache 118.

In embodiments involving storing each page as a separate file within adirectory structure, it is often important for extended cache manager116 to maintain a balanced directory structure to maintain good read andwrite performance to extended cache 118. To solve this technologicalproblem of how to maintain a balanced directory structure, extendedcache manager 116 can utilize a unique hashing algorithm to generatedirectory path prefixes for the pages.

Extended cache manager 116 can generate a directory path prefix for apage based on the following variables: k, f and h. The variable k canrefer to an object key (or equivalently a file name) that uniquelyidentifies the page. The variable f can refer to the fanout thatdetermines the maximum number of subdirectories allowed in a directory.The variable f may be a power of 2. The variable h can refer to themaximum height of the directory tree.

Extended cache manager 116 can generate a directory path prefix for apage identified by the object key k as follows. Initially, extendedcache manager 116 can compute a hash value v for the object key k usinga hash function hash that maps object keys to integers (e.g., 64-bitunsigned integers). The hash function hash can be any hash functionincluding, but not limited to, secure hash algorithm (SHA) and messagedigest (MD). For example, for an object keyk=2⁶²+1=4,611,868,018,427,387,905, hash(k) may return654231.

Extended cache manager 116 can then represent the hash value v inradix-f where f refers to the fanout. For example, when f=32, extendedcache manager 116 can represent hash value v 65431 in radix-32 as[19][30][31][17].

Finally, extended cache manager 116 can use the h least significantdigits for the hash value v represented in radix-f as the directorynames of the path. For example, when h=2, extended cache manager 116 canuse the 2 least significant digits of [19][30][31][17] to construct thepath to the page identified by object key k=4,611,868,018,427,387,905.For example, extended cache manager 116 can construct the path to thepage identified by object keykas/ecm-cache-location/31/17/4,611,868,018,427,387,905.

Extended cache manager 116 can also solve the above technologicalproblems by using a unique hybrid caching policy that makes the best useof extended cache 118's bandwidth while still exploiting the low I/Olatencies that extended cache 118 offers.

As discussed above, database system 100 may execute various databasetransactions. For example, database system 110 may execute a typicalOLAP workload consisting of (i) read-only transactions, which may makeup the majority of the workload, and (ii) update transactions. Extendedcache manager 116 may apply a hybrid caching policy to extended cache118 to improve bandwidth utilization of extended cache 118. For example,extended cache manager 116 may apply a different caching policy toextended cache 118 based on (i) the database transaction type (e.g., aread-only transaction or an update transaction) and (ii) the phase ofthe database transaction (e.g., execution or commit).

First, database system 100 may use various caching policies in the caseof read-only database transactions. In the case of a read-only databasetransaction and a cold cache (e.g., where pages associated with theread-only transaction have not been cached in buffer cache 114 orextended cache 118), database system 100 may read pages from objectstore 120 and cache them in buffer cache 114. However, as discussedabove, database system 100 may not be able to cache every page in buffercache 114 because it is of limited size.

To counteract this, extended cache manager 116 may extend the capacityof buffer cache 114 using extended cache 118. Extended cache manager 116may extend the capacity of buffer cache 114 in various ways. In someembodiments, extended cache manager 116 may extend the capacity ofbuffer cache 114 through read-through caching. For example, every timedatabase system 100 reads a page from object store 120, extended cachemanager 114 may asynchronously cache the page in extended cache 118.

In some other embodiments, every time database system 100 evicts a pagefrom buffer cache 114, extended cache manager 116 may cache the page inextended cache 118. In this case, extended cache 118 can act as swapcache for buffer cache 114, and naturally extends buffer cache 114'scapacity. Moreover, this can improve I/O latency because the evictedpages can be retrieved from extended cache 118 at a much lower latencycompared to retrieving them from object store 120.

Moreover, in the case of read-only database transactions, databasesystem 100 may (1) read pages synchronously from object store 120 forimmediate use or (2) prefetch them from object store 120 for potentialuse in the future. When database system 100 reads pages synchronouslyfrom object store 120, database system 100 may store the pages in buffercache 114 so that query engine 104 can immediately start operating onthe pages. On the other hand, when database system 100 prefetches a pagefrom object store 120, database system 100 may either store the page inbuffer cache 114 or extended cache 118.

Query engine 104 may end up using every prefetched page. Therefore, ifdatabase system 100 stores all prefetched pages in buffer cache 114,there is a chance that some of the prefetched pages needed by queryengine 104 may be prematurely evicted from buffer cache 114 before theyare needed. This may be because of cache pressure in buffer cache 114arising from an abundance of prefetched pages. This technologicalproblem may be exacerbated when the size of buffer cache 114 is small.

To solve this technological problem, database system 100 may store onlya randomly selected subset of prefetched pages in buffer cache 114.Database system 100 may store the remaining prefetched pages in extendedcache 118. Database system 100 may select the amount of randomlyselected prefetched pages to store in buffer cache 114 based on theratio of the size of buffer cache 114 to the size of all caches (e.g.,buffer cache 114 and extended cache 118).

Second, in the case of an update database transaction, database system100 may apply a different caching policy depending on the phase of theupdate database transaction, namely an execution phase or a commitphase.

During the execution phase, the update database transaction may createnew pages because data are being ingested into the database or readexisting pages and create new versions of these pages (e.g.,copy-on-write semantics). Database system 100 may apply a write-backcache policy to extended cache 118 based on the update databasetransaction being in an execution phase. For example, as pages areevicted from buffer cache 114 due to cache pressure, extended cachemanager 116 can synchronously write the evicted pages to extended cache118 while asynchronously writing the evicted pages to object store 120.Thus, the latency of the write operation is determined by the latency ofextended cache 118. Because the latency of extended cache 118 (e.g., anSSD) may be significantly smaller than the latency of object store 120,this is often desirable. If for some reason the update databasetransaction needs to be rolled back or aborted, the pages may eventuallyget discarded during an evict operation of extended cache 118.

Database system 100 may use the write-back policy for extended cache 118until the update database transaction declares an intent to commit,after which database system 100 may switch to a write-through policy.During the commit phase, database system 100 may write out every pagethat is created or updated by the update database transaction to objectstore 120.

Database system 100 may apply a write-through cache policy to extendedcache 118 based on the update database transaction being in a commitphase. For example, extended cache manager 116 can asynchronously writethe created or updated pages to extended cache 118 while synchronouslywriting the created or updated pages to object store 120. Thus, thelatency of the write operation is determined by the latency of objectstore 120.

While database system 100 may apply the write-back cache policy toextended cache 118 immediately, there may exist write-through pages(e.g., evicted pages) in extended cache manager 116 prior to applyingthe write-back cache policy. Extended cache manger 116 may write thesepages to object store 120 first. For example, extended cache manager 116may give higher priority to writing the write-through pages that existedprior to applying the write-back cache policy to object store 120.

Finally, extended cache manager 116 can solve the above technologicalproblems by redirecting a varying percentage of I/O operations to objectstore 120, thereby gracefully handling workloads that saturate thebandwidth of extended cache 118. An extended cache (e.g., extended cache118) often offers low random I/O latency at a valuable price performancepoint. However, the extended cache may also suffer from limitedbandwidth, especially in comparison to an object store (e.g., objectstore 120). Consequently, under busty workloads, using the extendedcache as a sole backbone of a secondary cache may have performanceimplications. For example, under heavy workloads where the extendedcache needs to serve a large number of read/write requests all at once,the average latency of the extended cache may be higher than the objectstore (e.g., exceeding 50 milliseconds).

To solve this technological problem, extended cache manager 116 may usethe above techniques to prioritize I/O operations and to take advantageof the fact that some operations can be deferred to a later stage in thedatabase transaction execution. In addition to these techniques,extended cache manager 116 may monitor the latency of completed I/Ooperations on both extended cache 118 and object store 120, andre-direct I/O operations originally intended for extended cache 118 toobject store 120 instead. In other words, extended cache manager 116 canfully utilize the bandwidth of extended cache 118 before resorting toobject store 120. As a result, extended cache manager 116 can benefitfrom the low latency of the extended cache 118 while not beingrestricted to its bandwidth.

To determine if extended cache 118's bandwidth is saturated, extendedcache manager 116 can monitor and compare the response times of readsand writes to extended cache 118 to those on object store 120. Extendedcache manager 116 can maintain a simple average of response times.Extended cache manager 116 can also rely on an exponential average ofresponse times, which places a greater emphasis on recent observationsand thereby avoids the problem of the average being disproportionallyskewed by historical values. Extended cache manager 116 can rely onvarious other response time calculations as would be appreciated by aperson of ordinary skill in the art.

To maintain up-to-date information about the response times on objectstore 120, extended cache manager 116 can always re-direct a smallpercentage of I/O requests to object store 120 regardless of whetherextended cache 118's bandwidth is saturated. As the response times forextended cache 118 increase, extended cache manger 116 can re-direct apercentage of I/O requests to object store 120 according to thefollowing formula.

$\alpha + {\left( {{100} - \ \alpha} \right) \times {MIN}\left( {1,\frac{{rt}\left( {{extended}{cache}118} \right)}{{rt}\left( {{object}{store}120} \right)}} \right.}$

α can denote the minimum percentage of I/O requests (e.g., 5%) thatextended cache manager 116 always re-directs to object store 120.rt(extended cache 118) can denote the response time (e.g., exponentialaverage or simple average) observed on extended cache 118. rt(objectstore 120) can denote the response time (e.g., exponential average orsimple average) observed on extended cache 118.

FIG. 3 is a flowchart for a method 300 for using an extended cache toaccess an object store efficiently, according to an embodiment. Method300 can be performed by processing logic that can comprise hardware(e.g., circuitry, dedicated logic, programmable logic, microcode, etc.),software (e.g., instructions executing on a processing device), or acombination thereof. It is to be appreciated that not all steps may beneeded to perform the disclosure provided herein. Further, some of thesteps may be performed simultaneously, or in a different order thanshown in FIG. 3 , as will be understood by a person of ordinary skill inthe art.

Method 300 shall be described with reference to FIG. 1 . However, method300 is not limited to that example embodiment.

In 302, database system 100 executes a database transaction, therebycausing pages to be written from buffer cache 114 to extended cache 118and object store 120.

Database system 100 can prefetch pages from object store 120 for storagein buffer cache 114 and extended cache 118. Database system 100 canrandomly select a first subset of prefetched pages from a set ofprefetched pages in object store 120 based a ratio between a size ofbuffer cache 114 to a total cache size. The total cache size may bebased on the size of buffer cache 114 and the size of extended cache118. Database system 100 can select a second subset of prefetched pagesfrom the set of prefetched pages in object store 120 based on the secondsubset of prefetched pages being absent in the first subset ofprefetched pages. Database system 100 can store the first subset ofprefetched pages in buffer cache 114. Database system 100 can store thesecond subset of prefetched pages in extended cache 118.

Extended cache manager 116 can store a page associated with the databasetransaction in extended cache 118 as a file. For example, extended cachemanager 116 can generate a hash value of an object key (or equivalentlya file name) of the page using a hash function. The hash function can beany hash function including, but not limited to, secure hash algorithm(SHA) and message digest (MD). Extended cache manager 116 can convertthe hash value to a radix value based on a first maximum value. Thefirst maximum number value can represent a maximum number ofsubdirectories allowed in a directory. The first maximum value can alsobe referred to as a fanout. In other words, extended cache manager 116can represent the hash value in radix-f where f refers to the fanout.Extended cache manager 116 can then generate a directory path based onthe radix value and a second maximum value. The second maximum value canrepresent a maximum height of a directory tree. For example, extendedcache manager 116 can use the second maximum value least significantdigits of the hash value represented in radix-f as the directory namesof the directory path. Extended cache manager 116 can then store thepage in extended cache 118 based on the generated directory path.

Extended cache manager 116 can also determine a first input/output (I/O)response time to extended cache 118. Extended cache manager 116 candetermine a second I/O response time to object store 120. Extended cachemanager 116 can re-direct a percentage of I/O requests for extendedcache 118 to object store 120 based on the first I/O response time, thesecond I/O response time, and a minimum value. The minimum value canrepresent a minimum percentage of I/O requests to be redirected toobject store 120.

For example, extended cache manger 116 can re-direct a percentage of I/Orequests to object store 120 according to the following formula.

$\alpha + {\left( {{100} - \ \alpha} \right) \times {MIN}\left( {1,\frac{{rt}\left( {{extended}{cache}118} \right)}{{rt}\left( {{object}{store}120} \right)}} \right.}$

α can denote the minimum percentage of I/O requests (e.g., 5%) thatextended cache manager 116 always re-directs to object store 120.rt(extended cache 118) can denote the response time (e.g., exponentialaverage or simple average) observed on extended cache 118. rt(objectstore 120) can denote the response time (e.g., exponential average orsimple average) observed on extended cache 118.

In 304, extended cache manger 116 determines a transaction type of thedatabase transaction. For example, extended cache manger 116 candetermine whether the database transaction is a read-only transaction oran update transaction.

In 306, extended cache manger 116 determines a phase of the databasetransaction based on the determined transaction type. For example,extended cache manger 116 can determine whether the phase is anexecution phase or a commit phase.

In 308, extended cache manger 116 applies a caching policy to extendedcache 118 for the written pages based on the determined transaction typeof the database transaction and the determined phase of the databasetransaction.

Extended cache manager 116 can apply a write-back cache policy toextended cache 118 based on the determined transaction type being anupdate transaction and the determined phase being an execution phase.Extended cache manager 116's applying of the write-back cache policy toextended cache 118 can cause the pages to be written from buffer cache114 to extended cache 118 to be written to extended cache 118synchronously. Extended cache manager 116's applying of the write-backcache policy to extended cache 118 can also cause the pages to bewritten from buffer cache 114 to object store 120 to be written toobject store 120 asynchronously.

Extended cache manager 116 can apply a write-through cache policy toextended cache 118 based on the determined transaction type being anupdate transaction and the determined phase being a commit phase.Extended cache manager 116's applying of the write-through cache policyto extended cache 118 can cause the pages to be written from buffercache 114 to extended cache 118 to be written to extended cache 118asynchronously. Extended cache manager 116's applying of thewrite-through cache policy to extended cache 118 can also cause thepages to be written from buffer cache 114 to object store 120 to bewritten to object store 120 synchronously.

Various embodiments may be implemented, for example, using one or morewell-known computer systems, such as computer system 400 shown in FIG. 4. One or more computer systems 400 may be used, for example, toimplement any of the embodiments discussed herein, as well ascombinations and sub-combinations thereof. For example, computer system400 may be used to implement method 300.

Computer system 400 may include one or more processors (also calledcentral processing units, or CPUs), such as a processor 404. Processor404 may be connected to a communication infrastructure or bus 406.

Computer system 400 may also include user input/output device(s) 403,such as monitors, keyboards, pointing devices, etc., which maycommunicate with communication infrastructure 406 through userinput/output interface(s) 402.

One or more of processors 404 may be a graphics processing unit (GPU).In an embodiment, a GPU may be a processor that is a specializedelectronic circuit designed to process mathematically intensiveapplications. The GPU may have a parallel structure that is efficientfor parallel processing of large blocks of data, such as mathematicallyintensive data common to computer graphics applications, images, videos,etc.

Computer system 400 may also include a main or primary memory 408, suchas random access memory (RAM). Main memory 408 may include one or morelevels of cache. Main memory 408 may have stored therein control logic(i.e., computer software) and/or data.

Computer system 400 may also include one or more secondary storagedevices or memory 410. Secondary memory 410 may include, for example, ahard disk drive 412 and/or a removable storage device or drive 414.Removable storage drive 414 may be a floppy disk drive, a magnetic tapedrive, a compact disk drive, an optical storage device, tape backupdevice, and/or any other storage device/drive.

Removable storage drive 414 may interact with a removable storage unit418. Removable storage unit 418 may include a computer usable orreadable storage device having stored thereon computer software (controllogic) and/or data. Removable storage unit 418 may be a floppy disk,magnetic tape, compact disk, DVD, optical storage disk, and/any othercomputer data storage device. Removable storage drive 414 may read fromand/or write to removable storage unit 418.

Secondary memory 410 may include other means, devices, components,instrumentalities or other approaches for allowing computer programsand/or other instructions and/or data to be accessed by computer system400. Such means, devices, components, instrumentalities or otherapproaches may include, for example, a removable storage unit 422 and aninterface 420. Examples of the removable storage unit 422 and theinterface 420 may include a program cartridge and cartridge interface(such as that found in video game devices), a removable memory chip(such as an EPROM or PROM) and associated socket, a memory stick and USBport, a memory card and associated memory card slot, and/or any otherremovable storage unit and associated interface.

Computer system 400 may further include a communication or networkinterface 424. Communication interface 424 may enable computer system400 to communicate and interact with any combination of externaldevices, external networks, external entities, etc. (individually andcollectively referenced by reference number 428). For example,communication interface 424 may allow computer system 400 to communicatewith external or remote devices 428 over communications path 426, whichmay be wired and/or wireless (or a combination thereof), and which mayinclude any combination of LANs, WANs, the Internet, etc. Control logicand/or data may be transmitted to and from computer system 400 viacommunication path 426.

Computer system 400 may also be any of a personal digital assistant(PDA), desktop workstation, laptop or notebook computer, netbook,tablet, smart phone, smart watch or other wearable, appliance, part ofthe Internet-of-Things, and/or embedded system, to name a fewnon-limiting examples, or any combination thereof.

Computer system 400 may be a client or server, accessing or hosting anyapplications and/or data through any delivery paradigm, including butnot limited to remote or distributed cloud computing solutions; local oron-premises software (“on-premise” cloud-based solutions); “as aservice” models (e.g., content as a service (CaaS), digital content as aservice (DCaaS), software as a service (SaaS), managed software as aservice (MSaaS), platform as a service (PaaS), desktop as a service(DaaS), framework as a service (FaaS), backend as a service (BaaS),mobile backend as a service (MBaaS), infrastructure as a service (IaaS),etc.); and/or a hybrid model including any combination of the foregoingexamples or other services or delivery paradigms.

Any applicable data structures, file formats, and schemas in computersystem 400 may be derived from standards including but not limited toJavaScript Object Notation (JSON), Extensible Markup Language (XML), YetAnother Markup Language (YAML), Extensible Hypertext Markup Language(XHTML), Wireless Markup Language (WML), MessagePack, XML User InterfaceLanguage (XUL), or any other functionally similar representations aloneor in combination. Alternatively, proprietary data structures, formatsor schemas may be used, either exclusively or in combination with knownor open standards.

In some embodiments, a tangible, non-transitory apparatus or article ofmanufacture comprising a tangible, non-transitory computer useable orreadable medium having control logic (software) stored thereon may alsobe referred to herein as a computer program product or program storagedevice. This includes, but is not limited to, computer system 400, mainmemory 408, secondary memory 410, and removable storage units 418 and422, as well as tangible articles of manufacture embodying anycombination of the foregoing. Such control logic, when executed by oneor more data processing devices (such as computer system 400), may causesuch data processing devices to operate as described herein.

Based on the teachings contained in this disclosure, it will be apparentto persons skilled in the relevant art(s) how to make and useembodiments of this disclosure using data processing devices, computersystems and/or computer architectures other than that shown in FIG. 4 .In particular, embodiments can operate with software, hardware, and/oroperating system implementations other than those described herein.

It is to be appreciated that the Detailed Description section, and notany other section, is intended to be used to interpret the claims. Othersections can set forth one or more but not all exemplary embodiments ascontemplated by the inventor(s), and thus, are not intended to limitthis disclosure or the appended claims in any way.

While this disclosure describes exemplary embodiments for exemplaryfields and applications, it should be understood that the disclosure isnot limited thereto. Other embodiments and modifications thereto arepossible, and are within the scope and spirit of this disclosure. Forexample, and without limiting the generality of this paragraph,embodiments are not limited to the software, hardware, firmware, and/orentities illustrated in the figures and/or described herein. Further,embodiments (whether or not explicitly described herein) havesignificant utility to fields and applications beyond the examplesdescribed herein.

Embodiments have been described herein with the aid of functionalbuilding blocks illustrating the implementation of specified functionsand relationships thereof. The boundaries of these functional buildingblocks have been arbitrarily defined herein for the convenience of thedescription. Alternate boundaries can be defined as long as thespecified functions and relationships (or equivalents thereof) areappropriately performed. Also, alternative embodiments can performfunctional blocks, steps, operations, methods, etc. using orderingsdifferent than those described herein.

References herein to “one embodiment,” “an embodiment,” “an exampleembodiment,” or similar phrases, indicate that the embodiment describedcan include a particular feature, structure, or characteristic, butevery embodiment can not necessarily include the particular feature,structure, or characteristic. Moreover, such phrases are not necessarilyreferring to the same embodiment. Further, when a particular feature,structure, or characteristic is described in connection with anembodiment, it would be within the knowledge of persons skilled in therelevant art(s) to incorporate such feature, structure, orcharacteristic into other embodiments whether or not explicitlymentioned or described herein. Additionally, some embodiments can bedescribed using the expression “coupled” and “connected” along withtheir derivatives. These terms are not necessarily intended as synonymsfor each other. For example, some embodiments can be described using theterms “connected” and/or “coupled” to indicate that two or more elementsare in direct physical or electrical contact with each other. The term“coupled,” however, can also mean that two or more elements are not indirect contact with each other, but yet still co-operate or interactwith each other.

The breadth and scope of this disclosure should not be limited by any ofthe above-described exemplary embodiments, but should be defined only inaccordance with the following claims and their equivalents.

1. (canceled)
 2. A computer implemented method for using an extendedcache to access an object store efficiently, comprising: executing adatabase transaction, wherein executing the database transaction causespages to be written from a buffer cache to the extended cache and to theobject store; determining a transaction type of the databasetransaction; determining a phase of the database transaction based onthe transaction type; and applying a caching policy to the extendedcache for the pages based on the transaction type and the phase of thedatabase transaction.
 3. The method of claim 2, further comprising:storing a page associated with the database transaction in the extendedcache as a separate file within a balanced directory structure.
 4. Themethod of claim 2, wherein the applying comprises: applying a write-backcache policy to the extended cache based on the transaction type beingan update transaction and the phase being an execution phase.
 5. Themethod of claim 2, wherein the applying comprises: applying awrite-through cache policy to the extended cache based on thetransaction type being an update transaction and the phase being acommit phase.
 6. The method of claim 2, further comprising: randomlyselecting a first subset of prefetched pages from a set of prefetchedpages in the object store; selecting a second subset of prefetched pagesfrom the set of prefetched pages in the object store based on the secondsubset of prefetched pages being absent in the first subset ofprefetched pages; storing the first subset of prefetched pages in thebuffer cache; and storing the second subset of prefetched pages in theextended cache.
 7. The method of claim 2, further comprising:redirecting a percentage of I/O requests for the extended cache to theobject store based on monitoring an I/O response time to the extendedcache and an I/O response time to the object store.
 8. The method ofclaim 2, further comprising: moving a page from the buffer cache to theextended cache based on a least recently used (LRU) policy.
 9. A system,comprising: a buffer cache; an extended cache; and at least oneprocessor coupled to the buffer cache and the extended cache andconfigured to: execute a database transaction, wherein executing thedatabase transaction causes pages to be written from the buffer cache tothe extended cache and to an object store; determine a transaction typeof the database transaction; determine a phase of the databasetransaction based on the transaction type; and apply a caching policy tothe extended cache for the pages based on the transaction type and thephase of the database transaction.
 10. The system of claim 9, whereinthe at least one processor is further configured to: store a pageassociated with the database transaction in the extended cache as aseparate file within a balanced directory structure.
 11. The system ofclaim 9, wherein to apply the caching policy to the extended cache, theat least one processor is configured to: apply a write-back cache policyto the extended cache based on the transaction type being an updatetransaction and the phase being an execution phase.
 12. The system ofclaim 9, wherein to apply the caching policy to the extended cache, theat least one processor is configured to: apply a write-through cachepolicy to the extended cache based on the transaction type being anupdate transaction and the phase being a commit phase.
 13. The system ofclaim 9, wherein the at least one processor is further configured to:randomly select a first subset of prefetched pages from a set ofprefetched pages in the object store; select a second subset ofprefetched pages from the set of prefetched pages in the object storebased on the second subset of prefetched pages being absent in the firstsubset of prefetched pages; store the first subset of prefetched pagesin the buffer cache; and store the second subset of prefetched pages inthe extended cache.
 14. The system of claim 9, wherein the at least oneprocessor is further configured to: redirect a percentage of I/Orequests for the extended cache to the object store based on monitoringan I/O response time to the extended cache and an I/O response time tothe object store.
 15. The system of claim 9, wherein the at least oneprocessor is further configured to: move a page from the buffer cache tothe extended cache based on a least recently used (LRU) policy.
 16. Anon-transitory computer-readable medium having instructions storedthereon that, when executed by at least one computing device, cause theat least one computing device to perform operations comprising:executing a database transaction, wherein executing the databasetransaction causes pages to be written from a buffer cache to anextended cache and to an object store; determining a transaction type ofthe database transaction; determining a phase of the databasetransaction based on the transaction type; and applying a caching policyto the extended cache for the pages based on the transaction type andthe phase of the database transaction.
 17. The non-transitorycomputer-readable medium of claim 16, wherein the operations furthercomprise: storing a page associated with the database transaction in theextended cache as a separate file within a balanced directory structure.18. The non-transitory computer-readable medium of claim 16, wherein theapplying comprises: applying a write-back cache policy to the extendedcache based on the transaction type being an update transaction and thephase being an execution phase.
 19. The non-transitory computer-readablemedium of claim 16, wherein the applying comprises: applying awrite-through cache policy to the extended cache based on thetransaction type being an update transaction and the phase being acommit phase.
 20. The non-transitory computer-readable medium of claim16, wherein the operations further comprise: randomly selecting a firstsubset of prefetched pages from a set of prefetched pages in the objectstore; selecting a second subset of prefetched pages from the set ofprefetched pages in the object store based on the second subset ofprefetched pages being absent in the first subset of prefetched pages;storing the first subset of prefetched pages in the buffer cache; andstoring the second subset of prefetched pages in the extended cache. 21.The non-transitory computer-readable medium of claim 16, wherein theoperations further comprise: redirecting a percentage of I/O requestsfor the extended cache to the object store based on monitoring an I/Oresponse time to the extended cache and an I/O response time to theobject store.